package com.gong.datacensus.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.TaskScheduler;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
import redis.clients.jedis.Jedis;

/**
 * @Description
 * @Author gongchang
 * @Date 2021-08-15 19:22
 */
@Configuration
public class BeanConfig {

    @Bean
    public Jedis redisUtil(){
        return new Jedis("192.168.1.133");
    }

    @Bean
    public TaskScheduler taskScheduler(){
        ThreadPoolTaskScheduler taskScheduler = new ThreadPoolTaskScheduler();
        taskScheduler.setPoolSize(10);

        return taskScheduler;
    }
}
